local xiongji = fk.CreateSkill {
  name = "lingling__xiongji_chiyou",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable {
  ["lingling__xiongji_chiyou"] = "凶骑",
  [":lingling__xiongji_chiyou"] = "锁定技，你计算与其他角色的距离-1。当你使用【杀】时，你进行判定，若为黑色则无法抵消。",
}

xiongji:addEffect(fk.CardUsing,{
  anim_type = "offensive",
  can_trigger = function (self, event, target, player, data)
    return target == player and player:hasSkill(xiongji.name) and
      data.card.trueName == "slash"
  end,
  on_cost = Util.TrueFunc,
  on_use = function (self, event, target, player, data)
    local room = player.room
    local judge = {
      who = player,
      reason = xiongji.name,
      pattern = ".|.|spade,club",
    }
    room:judge(judge)
    if judge:matchPattern() then
      data.disresponsiveList = table.simpleClone(player.room.players)
    end
  end,
})

xiongji:addEffect("distance", {
  correct_func = function(self, from, to)
    if from:hasSkill(xiongji.name) then
      return -1
    end
  end,
})

return xiongji
